﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using finProj.Entities;

namespace finProj
{
    class Settings
    {
        private static Settings instance;
        private Settings()
        {
            this.picManager = new PictureManager();
            this.clusterManager = new ClusterManager();
            this.existingKeys = new List<string>();
            this.state = 1;

        }
        public static Settings Instance
        {
          get 
          {
             if (instance == null)
             {
                 instance = new Settings();
             }
             return instance;
          }
        }


        public int numberOfPeople;
        public string path;

        public PictureManager picManager;
        public ClusterManager clusterManager;
        public List<string> existingKeys;
        public double[,] MinimizationMatrix;
        public int state;


        public void SetMinimizationMatrix(double[,] matrix)
        {
            MinimizationMatrix = new double[this.existingKeys.Count(), this.existingKeys.Count()];
            for(int i=0;i<this.existingKeys.Count();i++)
            {
                for(int j=0;j<this.existingKeys.Count();j++)
                {
                    this.MinimizationMatrix[i, j] = matrix[i, j];
                }
            }
        }
        public void setName(int i, string name)
        {
            this.clusterManager.clusters[i].Name = name;

            //foreach (var picture in clusterManager.clusters[i].pictures)
            //{
            //    picture.Name = name;
            //}

        }


    }
}
